const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_bidinfo', {
    id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      comment: "编号",
      field: 'ID'
    },
    keyGuid: {
      type: DataTypes.CHAR(36),
      allowNull: false,
      comment: "键名",
      field: 'KeyGUID'
    },
    rightCode: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "组织机构代码",
      field: 'RightCode'
    },
    title: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "标题",
      field: 'Title'
    },
    prjNum: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目编号",
      field: 'PrjNum'
    },
    tenderNum: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "招投标编号",
      field: 'TenderNum'
    },
    tenderClassNum: {
      type: DataTypes.STRING(3),
      allowNull: true,
      comment: "招投标属性编号",
      field: 'TenderClassNum'
    },
    tenderTypeNum: {
      type: DataTypes.STRING(3),
      allowNull: true,
      comment: "招投标种类编号",
      field: 'TenderTypeNum'
    },
    tenderResultDate: {
      type: DataTypes.DATEONLY,
      allowNull: true,
      comment: "招投标结束日期",
      field: 'TenderResultDate'
    },
    tenderMoney: {
      type: DataTypes.DECIMAL(15,4),
      allowNull: true,
      comment: "中标金额",
      field: 'TenderMoney'
    },
    prjSize: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "项目规模",
      field: 'PrjSize'
    },
    area: {
      type: DataTypes.DECIMAL(15,4),
      allowNull: true,
      comment: "面积",
      field: 'Area'
    },
    econCorpName: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "中标公司名称",
      field: 'EconCorpName'
    },
    econCorpCode: {
      type: DataTypes.STRING(40),
      allowNull: true,
      comment: "中标编码",
      field: 'EconCorpCode'
    },
    tenderCorpName: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "投标公司名称",
      field: 'TenderCorpName'
    },
    tenderCorpCode: {
      type: DataTypes.STRING(40),
      allowNull: true,
      comment: "投标公司组织机构代码",
      field: 'TenderCorpCode'
    },
    idCardTypeNum: {
      type: DataTypes.STRING(3),
      allowNull: true,
      comment: "身份证属性编号",
      field: 'IDCardTypeNum'
    },
    tenderEmpName: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "投标人名称",
      field: 'TenderEmpName'
    },
    conStructorIdCard: {
      type: DataTypes.STRING(30),
      allowNull: true,
      comment: "建筑师身份证号",
      field: 'ConStructorIDCard'
    },
    registerDate: {
      type: DataTypes.DATEONLY,
      allowNull: true,
      comment: "登记日期",
      field: 'RegisterDate'
    },
    createTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "登记时间",
      field: 'CreateTime'
    },
    lastUpdateTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "上次修改时间",
      field: 'LastUpdateTime'
    },
    lastSyncTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "上次同步时间",
      field: 'LastSyncTime'
    },
    stguid: {
      type: DataTypes.CHAR(36),
      allowNull: true,
      comment: "标识id",
      field: 'STGUID'
    },
    flowCode: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "生产规范",
      field: 'FlowCode'
    },
    dtIdSet: {
      type: DataTypes.TEXT,
      allowNull: true,
      field: 'dtIDSet'
    },
    buildCorpName: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "建筑工地名称",
      field: 'BuildCorpName'
    },
    buildCorpCode: {
      type: DataTypes.STRING(40),
      allowNull: true,
      comment: "建筑公司统一机构编码",
      field: 'BuildCorpCode'
    },
    builder: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "建筑工地",
      field: 'Builder'
    },
    builderTel: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "工地地址",
      field: 'BuilderTel'
    },
    buildCorpAddress: {
      type: DataTypes.STRING(200),
      allowNull: true,
      comment: "工地地址",
      field: 'BuildCorpAddress'
    },
    isAllowSync: {
      type: DataTypes.SMALLINT,
      allowNull: true,
      comment: "是否允许同步",
      field: 'IsAllowSync'
    },
    tenderEmpZgzs: {
      type: DataTypes.STRING(200),
      allowNull: true,
      field: 'TenderEmpZGZS'
    },
    projectGq: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "项目工期",
      field: 'ProjectGQ'
    },
    zlmb: {
      type: DataTypes.STRING(200),
      allowNull: true,
      field: 'ZLMB'
    },
    qualificationLevOfTenderCorp: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "公司资质",
      field: 'QualificationLevOfTenderCorp'
    },
    areaflag: {
      type: DataTypes.SMALLINT,
      allowNull: true,
      comment: "中标面积"
    },
    sourceId: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "起始id",
      field: 'sourceID'
    },
    prjFinishNum: {
      type: DataTypes.STRING(20),
      allowNull: true,
      comment: "项目完成编号",
      field: 'PrjFinishNum'
    },
    finishDate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "完成日期",
      field: 'FinishDate'
    },
    isSync: {
      type: DataTypes.SMALLINT,
      allowNull: true,
      comment: "是否同步",
      field: 'IsSync'
    },
    classId: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "属性id",
      field: 'ClassID'
    },
    startDate: {
      type: DataTypes.DATEONLY,
      allowNull: true,
      comment: "开始日期",
      field: 'StartDate'
    },
    endDate: {
      type: DataTypes.DATEONLY,
      allowNull: true,
      comment: "结束日期",
      field: 'EndDate'
    },
    builderLicenceNum: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "建筑许可证编号",
      field: 'BuilderLicenceNum'
    },
    tenderEmpTel: {
      type: DataTypes.STRING(50),
      allowNull: true,
      comment: "中标电话",
      field: 'TenderEmpTel'
    },
    areaCode: {
      type: DataTypes.STRING(6),
      allowNull: true,
      comment: "起始面积",
      field: 'AreaCode'
    },
    bStatus: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "等级"
    },
    zbBidGuid: {
      type: DataTypes.CHAR(36),
      allowNull: true,
      comment: "招标信息ID",
      field: 'ZBBidGuid'
    },
    changeFlowStatus: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "变更人等级",
      field: 'ChangeFlowStatus'
    },
    tenderCorpDetailName: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "投标公司详细名称",
      field: 'TenderCorpDetailName'
    },
    buildCorpDetailName: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建筑公司详细名称",
      field: 'BuildCorpDetailName'
    },
    econCorpDetailName: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "中标公司详细名称",
      field: 'EconCorpDetailName'
    },
    jgdtIdSet: {
      type: DataTypes.STRING(50),
      allowNull: true,
      field: 'jgdtIDSet'
    },
    dlxmzg: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    dlxmjbr: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    dlxmzgIdCard: {
      type: DataTypes.STRING(50),
      allowNull: true,
      field: 'dlxmzgIDCard'
    },
    dlxmjbrIdCard: {
      type: DataTypes.STRING(50),
      allowNull: true,
      field: 'dlxmjbrIDCard'
    },
    isDzyzProject: {
      type: DataTypes.SMALLINT,
      allowNull: true,
      field: 'IsDZYZProject'
    },
    memo: {
      type: DataTypes.STRING(200),
      allowNull: true,
      field: 'Memo'
    },
    startbidTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "开始时间"
    },
    shguid: {
      type: DataTypes.CHAR(36),
      allowNull: true,
      field: 'SHGUID'
    },
    shSyncTime: {
      type: DataTypes.DATE,
      allowNull: true,
      field: 'SHSyncTime'
    },
    zbkzj: {
      type: DataTypes.DOUBLE,
      allowNull: true
    },
    zbCorpName: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "招标公司名称",
      field: 'ZBCorpName'
    },
    zbCorpCorpCode: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "招标公司组织机构代码",
      field: 'ZBCorpCorpCode'
    },
    tenderCorpKindId: {
      type: DataTypes.INTEGER,
      allowNull: true,
      comment: "招标公司id",
      field: 'TenderCorpKindID'
    },
    tenderResultEndDate: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "投标结果日期",
      field: 'TenderResultEndDate'
    },
    creattime: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "创建时间"
    }
  }, {
    sequelize,
    tableName: 'base_bidinfo',
    timestamps: false,
    indexes: [
      {
        name: "KeyGUID",
        using: "BTREE",
        fields: [
          { name: "KeyGUID" },
        ]
      },
    ]
  });
};
